home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / python2.4 / sliceobject.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-10-18  |  1.1 KB  |  43 lines

  1. #ifndef Py_SLICEOBJECT_H
  2. #define Py_SLICEOBJECT_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6.  
  7. /* The unique ellipsis object "..." */
  8.  
  9. PyAPI_DATA(PyObject) _Py_EllipsisObject; /* Don't use this directly */
  10.  
  11. #define Py_Ellipsis (&_Py_EllipsisObject)
  12.  
  13. /* Slice object interface */
  14.  
  15. /*
  16.  
  17. A slice object containing start, stop, and step data members (the
  18. names are from range).  After much talk with Guido, it was decided to
  19. let these be any arbitrary python type.  Py_None stands for omitted values.
  20. */
  21.  
  22. typedef struct {
  23.     PyObject_HEAD
  24.     PyObject *start, *stop, *step;    /* not NULL */
  25. } PySliceObject;
  26.  
  27. PyAPI_DATA(PyTypeObject) PySlice_Type;
  28.  
  29. #define PySlice_Check(op) ((op)->ob_type == &PySlice_Type)
  30.  
  31. PyAPI_FUNC(PyObject *) PySlice_New(PyObject* start, PyObject* stop,
  32.                                   PyObject* step);
  33. PyAPI_FUNC(int) PySlice_GetIndices(PySliceObject *r, int length,
  34.                                   int *start, int *stop, int *step);
  35. PyAPI_FUNC(int) PySlice_GetIndicesEx(PySliceObject *r, int length,
  36.                     int *start, int *stop, 
  37.                     int *step, int *slicelength);
  38.  
  39. #ifdef __cplusplus
  40. }
  41. #endif
  42. #endif /* !Py_SLICEOBJECT_H */
  43.